var jwt = require('jsonwebtoken')

const signtoken = async (userdata) => {
    return await jwt.sign({
        data: userdata
    }, 'secret', { expiresIn: '1h' })
}

module.exports = { signtoken }